home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / ABUSESRC.ZIP / AbuseSrc / macabuse / src / net / inc / indian.hpp next >
Encoding:
C/C++ Source or Header  |  1997-05-20  |  619 b   |  30 lines

  1. #ifndef lltl
  2.  
  3. #ifdef __sgi
  4. #define BIGUNS
  5. #endif
  6.  
  7.  
  8. // these macros swap the "endians" of a word to intel form... this should be done for anything sent
  9. // across the net as the other computer might have a different endianess
  10.  
  11. #ifdef BIGUNS
  12. #define lstl(x) (((((unsigned short) (x)))<<8)|((((unsigned short) (x)))>>8))
  13. #define lltl(x) \
  14.    ((( ((unsigned long)(x)) )>>24)|((( ((unsigned long)(x)) )&0x00ff0000)>>8)| \
  15.    ((( ((unsigned long)(x)) )&0x0000ff00)<<8)|(( ((unsigned long)(x)) )<<24))
  16. #else
  17. #define lstl(x) (x)
  18. #define lltl(x) (x)
  19.  
  20. #endif
  21.  
  22. #define uchar unsigned char
  23.  
  24. #endif
  25.  
  26.  
  27.  
  28.  
  29.  
  30.